<table>
    <tr>
        <th>Name</th>
        <th>Parent</th>
        <th>&nbsp</th>
    </tr>
    <% @groups.inspect %>
    <% for group in @groups %>
    <tr>
        <td><%= group.name %></td>
        <td><%= group.parent.name if !group.parent_id.nil?%><%= "Top" if group.parent_id.nil?%></td>
        <td><%= link_to('Edit', :action=>'edit_group',:id=>group)%>&nbsp;<%= link_to 'Destroy', {:action => 'destroy_group', :id=> group},  { :confirm => "Are you sure?", :post => true } %></td>
    </tr>
    <% end -%>
</table>
<%= link_to('New', :action=>'new_group')%>